package com.dkhseep.bigevent.config;

import com.dkhseep.bigevent.interceptor.Logininterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * 功能:
 * 作者:Dksheep
 * 日期:2024/10/816:46
 */
@Configuration
public class WebConfig implements WebMvcConfigurer {
    @Autowired
    private Logininterceptor logininterceptor;
    public void addInterceptors(InterceptorRegistry registry) {
        //定义放行接口
        registry.addInterceptor(logininterceptor).excludePathPatterns("/user/login","/user/register");
    }
}
